﻿using DistributedVisionRunner.Interface;
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;

namespace DistributedVisionRunner.Module.Converters
{
    public class OutputDataTypeToBoundaryHeaderConverter : MarkupExtension, IValueConverter
    {
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return this;
        }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var dataType = (OutputDataType)value;
            string output = null;
            switch (dataType)
            {
                case OutputDataType.Raw:
                    output = "原始值的上下限";
                    break;
                case OutputDataType.Weighted:
                    output = "补偿后值的上下限";
                    break;
                case OutputDataType.Reserved:
                    output = "预留值的上下限";
                    break;
            }

            return output;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}